package com.fruit.order.main;

import com.fruit.util.LogBackConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;


/**
 * 程序入口
 *
 * @author shibeilei
 * @version 2017.06.08 17:40
 */
@ImportResource({ "classpath:applicationContext-trans.xml", "classpath:applicationContext-dao.xml",
		"classpath:dubbo-provider.xml" })
@SpringBootApplication(scanBasePackages = "com.fruit")
@EnableScheduling
public class OrderProvider {
	/**
	 * main方法
	 *
	 * @param args
	 *            参数
	 */
	public static void main(String[] args) {
		//配置logback
		LogBackConfig.config(args, OrderProvider.class.getClassLoader());
		SpringApplication.run(OrderProvider.class, args);

		synchronized (OrderProvider.class) {
			while (true) {
				try {
					OrderProvider.class.wait();
				} catch (Throwable e) {
					e.printStackTrace();
				}
			}
		}
	}
}